import random
import time
from concurrent.futures import ThreadPoolExecutor

a = [1,2,3,4,5,6]
def print_num(num):
    time.sleep(random.randint(1,5))
    print(num)
with ThreadPoolExecutor(max_workers=10) as pool:
    pool.map(print_num,a)